<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-for 遍历字符串</title>
</head>
<body>
<div id="app">
    <ul>
        <li>{{ string[0] }}</li>
        <li>{{ string[1] }}</li>
        <li>{{ string[2] }}</li>
        <li>{{ string[3] }}</li>
        <li>{{ string[4] }}</li>
        <li>{{ string[5] }}</li>
        <li>{{ string[6] }}</li>
        <li>{{ string[7] }}</li>
        <li>{{ string[8] }}</li>
        <li>{{ string[9] }}</li>
        <li>{{ string[10] }}</li>
    </ul>

    <ul>
        <li v-for="item in string">{{ item }}</li>
    </ul>

    <ul>
        <li v-for="(item, index) in string">{{index}}.{{ item }}</li>
    </ul>
</div>

<script type="module">
    import {createApp, reactive} from "../../../js/vue.esm-browser.js";

    let app = createApp(
        {
            setup() {
                let string = "Hello, Vue!"
                return {string}
            }
        }
    );

    app.mount("#app")
</script>
</body>
</html>